package com.zhichat.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhichat.entity.UserInfoEntity;
import com.zhichat.web.dto.dao.AdminUserListQuery;
import com.zhichat.web.vo.AdminUserInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 用户信息表
 *
 * @author lzq
 * @email lzq@hello.com
 * @date 2024-10-25 21:47:01
 */
@Mapper
@Repository
public interface UserInfoDao extends BaseMapper<UserInfoEntity> {

    /**
     * 获取用户信息列表（根据不同条件筛选，并分页）
     */
    List<AdminUserInfoVO> getUserInfoListOfAdmin(AdminUserListQuery query);

    /**
     * 根据用户ID 修改 用户最后离线时间
     */
    boolean updateLastOffTimeByUserId(@Param("lastOffTime") Long lastOffTime, @Param("userId") Long userId);

    List<AdminUserInfoVO> demo(Map<String,Object> param);
}
